In recent years, we have greeted the age of multimedia in which audio, video and other data are integrally handled, and conventional information media (i.e., means for transmitting information to persons), such as newspapers, magazines, televisions, radios, and telephones have been adopted as subjects of multimedia. Generally, “multimedia” means to represent not only characters but also diagrams, speeches and especially images simultaneously in relation with each other. In order to handle the conventional information media as the subjects of multimedia, it is essential to transform the information into digital format.
When the quantity of data processed by each information medium described above is estimated as the quantity of digital data, in the case of characters, the data quantity for each character is 1˜2 bytes. However, in the case of speech, the data quantity is 64 kbits per second (quality for telecommunication) and, in the case of moving pictures, it is more than 100 Mbits per second (quality for current television broadcasting). So, as for the information media described above, it is not practical to handle such massive data as it is in the digital format. For example, visual telephones have already been put to practical use by ISDN (Integrated Services Digital Network) having a transmission rate of 64 kbps ˜1.5 Mbps, but it is impossible to transmit an output image of a television camera having a large quantity of data as it is by the ISDN.
So, data compression technologies are demanded. For example in the case of visual telephones, the moving picture compression technologies standardized as H.261 and H.263 by ITU-T (International Telecommunication Union-Telecommunication Sector) are employed. Further, according to the data compression technology based on MPEG-1, it is possible to record image data, together with audio data, in an ordinary music CD (compact disk).
Under the existing circumstances, standardization of MPEG-4 having a higher compression rate has been realized by the working group for the standardization of MPEG-1 and MPEG-2 (ISO/IEC JTC1/SC29/WG11). MPEG-4 not only enables coding at a low bit rate with high efficiency but also realizes introduction of a strong error resistant technology that can reduce a subjective deterioration of image quality even when a transmission line error occurs. Further, ITU-T is developing standardization of H.26L as an image coding method of the next generation, and the latest coding method at this point of time is a method called “Test Model 8” (TML8).
FIG. 30 is a block diagram illustrating a conventional image coding apparatus.
This image coding apparatus 201a has a blocking unit Blk for blocking an inputted image signal Vin into unit areas (blocks) each comprising a predetermined number of pixels and outputting a blocked image signal BlkS, and a frequency transformation unit Trans for subjecting the output BlkS to frequency transformation to output frequency components TransS corresponding to respective blocks. Here, the block is an area of a predetermined size in a picture (image space), which is a unit for a coding process of an image signal, and it is composed of a predetermined number of pixels. Here, the image signal Vin corresponds to a moving image that is composed of plural pictures.
The image coding apparatus 201a further includes a quantization unit Q for quantizing the outputs (frequency components) TransS from the frequency transformation unit and outputting quantized components (quantization coefficients) QS corresponding to respective blocks, and a coding unit RLE0a for subjecting the outputs (quantized components) Qs from the quantization unit to a variable length coding process.
Next, its operation will be described.
When an image signal Vin is inputted to the image coding apparatus 201a, the blocking unit Blk divides the inputted image signal Vin into image signals corresponding to block units, to generate an image signal (blocked image signal) BlkS corresponding to each block. The frequency transformation unit Trans transforms the blocked image signal BlkS into frequency components TransS according to DCT (Discrete Cosine Transformation) or Wavelet transformation. The quantization unit Q quantizes the frequency components TransS in a predetermined quantization step on the basis of a quantization parameter QP to output quantized components QS, as well as outputs the quantization parameter QP. Then, the coding unit RLE0a subjects the quantized components QS to a variable length coding process, and outputs a coded steam Str0a. 
FIG. 31 is a block diagram for explaining the coding unit RLE0a that constitutes the image coding apparatus 201a. 
This coding unit RLE0a has a zigzag scanner Scan for transforming the outputs (quantized components) QS of the quantization unit Q in a two-dimensional array into quantized component Coef in a one-dimensional array (i.e., predetermined order), and a variable length coder VLC for subjecting the quantized components Coef outputted from the zigzag scanner Scan to a variable length coding process.
When the quantized components QS outputted from the quantization unit Q are inputted to the coding unit RLE0a, the zigzag scanner Scan transforms the quantized components QS in a two-dimensional array from the quantization unit Q into quantized components Coef in a one-dimensional array (predetermined order), and outputs the quantized components.
FIG. 43 is a diagram for specifically explaining the process for transforming the quantized components QS by the zigzag scanner Scan.
As shown in FIG. 43, the quantized components QS outputted from the quantization unit Q have a two-dimensional array, i.e., an array in which the quantized components QS are arranged in the form of a matrix on a two-dimensional frequency region Fr according to the height of the horizontal frequency component and the height of the vertical frequency component.
The zigzag scanner Scan carries out a process for scanning the quantized components QS in the two-dimensional array in a zigzag manner as shown by arrows Y1 to Y7, to transform the components into quantized components Coef in a one-dimensional array. That is, in this scan process, a predetermined order along the scanning course is set with respect to the plural quantized components QS in the two-dimensional array.
Then, the variable length coder VLC assigns codes to the quantized components Coef which are outputted from the zigzag scanner Scan, with using a code table that shows a correlation between numerical values indicating the sizes of the quantized components and codes (code words), to transform the quantized components into a coded stream Str0a corresponding to each block.
FIG. 32 is a block diagram for explaining an image decoding apparatus 202a corresponding to the image coding apparatus 201a as shown in FIG. 30.
This image decoding apparatus 202a decodes the coded stream Str0a which is outputted from the conventional image coding apparatus 201a as shown in FIG. 30.
The image decoding apparatus 202a has a decoding unit RLD0a for decoding the coded stream Str0a which is outputted from the image coding apparatus 201a, and an inverse quantization unit IQ for subjecting outputs (decoded quantization components) DQS from the decoding unit RLD0a to an inverse quantization process.
The image decoding apparatus 202a further includes an inverse frequency transformation unit ITrans for subjecting outputs (decoded frequency components) ITransS from the inverse quantization unitIQ to an inverse frequency transformation process, and a deblocking unit Deblk for generating a decoded image signal Vout corresponding to each picture on the basis of outputs (decoded blocked image signals) DBlkS from the inverse frequency transformation unit ITrans.
Next, its operation will be described.
When the coded stream Str0a is inputted from the image coding apparatus 201a to the image decoding apparatus 202a, the decoding unit RLD0a decodes the coded stream Str0a and outputs decoded quantized components DQS. The operation of the decoding unit RLD0a is the inverse of the operation of the coding unit RLE0a. 
The inverse quantization unit IQ carries out the inverse of the operation of the quantization unit Q, i.e., an operation of inversely quantizing the decoded quantized components DQS with referring to the quantization parameter QP, and outputs decoded frequency components ITransS. The inverse frequency transformation unit ITrans carries out the inverse of the operation of the frequency transformation unit Trans, i.e., an operation of subjecting the decoded frequency components ITransS to inverse DCT or inverse wavelet transformation, to reconstitute decoded image signals DBlkS corresponding to respective blocks. Then, the deblocking unit DeBlk integrates the decoded image signals DBlkS of the respective blocks to output a decoded image signal Vout corresponding to each picture (frame).
FIG. 33 is a block diagram for explaining the decoding unit RLD0a that constitutes the image decoding apparatus 202a. 
The decoding unit RLD0a has a variable length decoder VLD for subjecting the coded stream Str0a to a variable length decoding process to decode the quantized component Coef corresponding to each code included in the coded stream Str0a, and an inverse zigzag scanner IScan for reconstituting quantized components DQS in a two-dimensional array from the decoded quantized components Coef in a one-dimensional array, which are outputted from the variable length decoder VLD.
In this decoding unit RLD0a, the variable length decoder VLD decodes the coded stream Str0a according to the inverse operation to the variable length coder VLC, and outputs quantized components Coef corresponding to codes (code words). Then, the inverse zigzag scanner IScan carries out the inverse operation to the zigzag scanner Scan, to reconstitute decoded quantized components DQS in a two-dimensional array from the quantized components Coef in a one-dimensional array, which are outputted from the variable length decoder VLD, and outputs the decoded quantized components DQS to the inverse quantization unit IQ.
Japanese Published Patent Application No. Hei. 6-311534 discloses a method in which an image signal is divided into a luminance signal and a color-difference signal to subject the obtained signals to a variable length coding process.
The plural quantized components corresponding to respective blocks, to which the predetermined order has been set, are data including a high redundancy, i.e., data in which plural coefficients whose values are zero (zero coefficients) continue after a coefficient whose value is not zero (non-zero coefficient). To encode such quantized components, a method in which quantized components are encoded with its redundant information being deleted, for example, a run-length encoding method in which quantized components are encoded by using a run value that indicates the number of successive zero coefficients and a level value that indicates a value of a non-zero coefficient following the zero coefficients has been conventionally employed.
Hereinafter, a conventional image coding apparatus using the run-length encoding method will be described.
FIG. 34 is a block diagram illustrating a conventional image coding apparatus that carries out the run-length encoding.
This image coding apparatus 201b includes, in place of the coding unit RLE0a of the image coding apparatus 201a shown in FIG. 30, a run-length encoding unit RLE0b for subjecting outputs (quantized components) QS from the quantization unit Q to run-length encoding and outputting a coded stream Str0b. Other components are the same as those of the image coding apparatus 201a. 
The operation of the image coding apparatus 201b is different from that of the image coding apparatus 201a only in the operation of the coding unit RLE0b. 
FIG. 35 is a block diagram illustrating a specific construction of the coding unit RLE0b in the image coding apparatus 201b. 
This run-length encoding unit RLE0b has, like the coding unit RLE0a, a zigzag scanner Scan for transforming outputs (quantized components) QS in a two-dimensional array from the quantization unit Q into quantized components Coef in a one-dimensional (i.e., a predetermined order).
Then, this run-length encoding unit RLE0b further includes a run calculator RunCal for calculating the number of successive quantized components whose values are zero (zero coefficients) Coef and outputting a run value Run indicating the number of successive zero coefficients, and a level calculator LevCal for calculating a value of a quantized component whose value is not zero (non-zero coefficient), following the zero coefficients, and outputting a level value Lev indicating the value of the non-zero coefficient.
The run-length encoding unit RLE0b further includes a variable length coder LevVLC for subjecting the level value Lev that is outputted from the level calculator LevCal to a variable length coding process and outputting a code string (level value code string) LStr, a variable length coder RunVLC for subjecting the run value Run that is outputted from the run calculator RunCal to a variable length coding process and outputting a code string (run value code string) RStr, and a multiplexer. MUX for multiplexing the level value code string LStr and the run value code string RStr for each block and outputting a multiplexed coded stream Str0b. 
Next, its operation will be described.
The zigzag scanner Scan transforms the quantized components QS in a two-dimensional array, which are outputted from the quantization unit Q, into quantized components Coef in a one-dimensional array (predetermined order), and outputs the quantized components Coef. The transformation process for the quantized components Qs by the zigzag scanner Scan is carried out in the same manner as that in the coding unit RLE0a of the image coding apparatus 201a. 
The run calculator RunCal calculates the number of successive zero coefficients on the basis of the quantized components Coef which are outputted from the zigzag scanner Scan, and outputs a run value Run indicating the calculated number. The level calculator LevCal calculates a value of a non-zero coefficient that follows the successive zero coefficients, on the basis of the quantized components Coef outputted from the zigzag scanner Scan, and outputs a level value Lev indicating this value.
Here, the run calculator RunCal generates a special value EOB (End of Block) when detecting the highest frequency component (the last non-zero coefficient) in the target block to be processed, to inform that subsequent higher frequency components have all zero value.
Further, the variable length coder RunVLC subjects the run value Run which is outputted from the run calculator RunCal to a variable length coding process for assigning a code (code word) to the run value according to a code table or arithmetic operation, and outputs a code string RStr. The variable length coder LevVLC subjects the level value Lev which is outputted from the level calculator LevCal to a variable length coding process for assigning a code (code word) to the level value according to a code table or arithmetic operation, and outputs a code string LStr.
The multiplexer MUX multiplexes the code string LStr and the code string RStr for each block, and outputs a multiplexed coded stream Str0b. 
Here, the process for multiplexing the code string LStr and the code string RStr is carried out for each block, for example, in such manner that the code string RStr corresponding to all run values for a target block is followed by the code string LStr corresponding to all level values for the target block, or the code string LStr corresponding to all level values for a target block is followed by the code string RStr corresponding to all run values for the target block.
The image coding apparatus as described above for encoding plural quantized coefficients in a predetermined order, by using the run value Run indicating the number of quantized components whose values are zero (zero coefficients) Coef, and the level value Lev indicating a value of a quantized component whose value is not zero (non-zero coefficient) Coef, following the zero coefficients, can encode the plural quantized coefficients at a higher coding efficiency, while removing its redundant information.
FIG. 36 is a block diagram for explaining an image decoding apparatus 202b corresponding to the image coding apparatus 201b as shown in FIG. 34.
This image decoding apparatus 202b decodes the coded stream Str0 that is outputted from the conventional image coding apparatus 201b as shown in FIG. 34.
The image decoding apparatus 202b has, in place of the decoding unit RLD0a of the image decoding apparatus 202a shown in FIG. 32, a run-length decoding unit RLD0b for subjecting the coded stream Str0b that is outputted from the image coding apparatus 201b to a run-length decoding process. Other components are identical to those of the image decoding apparatus 202a. 
The operation of the image decoding apparatus 202b is different from the image decoding apparatus 202a only in the operation of the decoding unit RLD0b. 
FIG. 37 is a block diagram illustrating a specific construction of the run-length decoding unit RLD0b in the image decoding apparatus 202b. 
This run-length decoding unit RLD0b has a demultiplexer DMUX for demultiplexing the multiplexed coded stream Str0b that is outputted from the image coding apparatus 201b to obtain the code string LStr corresponding to the level values and the code string RStr corresponding to the run values, a variable length decoder LevVLD for subjecting the code string LStr to a variable length decoding process to reconstitute the level values Lev, a variable length decoder RunVLC for subjecting the code string RStr to a variable length decoding process to reconstitute the run values Run, and an inverse zigzag scanner IScan for reconstituting decoded quantized components DQS in a two-dimensional array from decoded quantized components in a one-dimensional array, which are represented by the level values Lev and the run values Run.
Next, its operation will be described.
In the image decoding apparatus 202b, the run-length decoding unit RLD0b carries out the inverse operation to the run-length encoding unit RLE0b. That is, the run-length decoding unit RLD0b demultiplexes the multiplexed coded stream Str0b to obtain the code string Lstr corresponding to the level values and the code string RStr corresponding to the run values.
Then, the variable length decoder LevVLD decodes the code string LStr corresponding to the level values by the inverse operation to the variable length coder LevVLC, and outputs the level values Lev. The variable length decoder RunVLD decodes the code string RStr corresponding to the run values by the inverse operation to the variable length coder RunVLC, and outputs the run values Run.
The inverse zigzag scanner IScan reconstitutes decoded quantized components DQS in a two-dimensional array from the quantized components in a one-dimensional array, which are represented by the level values Lev and the run values Run, by the inverse operation to the zigzag scanner Scan, and outputs the decoded quantized components to the inverse quantization unit IQ. However, this inverse zigzag scanner IScan (see FIG. 37) is different from the inverse zigzag scanner IScan as shown in FIG. 33 in that the level value Lev and the run value Run are inputted thereto. Thus, the inverse zigzag scanner IScan shown in FIG. 37 has a function of converting a coefficient that is represented by the level value Lev and the run value Run into a quantized components Coef.
According to the image decoding apparatus that carries out a decoding process for decoding plural quantized coefficients in a predetermined order, by using the run value Run indicating the number of quantized components whose values are zero (zero coefficients) Coef and the level value Lev indicating a value of a quantized component whose value is not zero (non-zero coefficient) Coef, following the zero coefficients, coded data which is obtained by coding plural quantized components according to run-length encoding with removing its redundant information at a higher coding efficiency is decoded satisfactorily.
Hereinafter, another example of the conventional image coding apparatus using the run-length encoding method will be described.
FIG. 38 is a block diagram illustrating another example of the image coding apparatus that employs the conventional run-length encoding unit. Almost all of the conventional image coding apparatuses which are compliant with standards such as MPEG, or H.261 and H.263 (ITU), or a draft H26L standard (TML8) that is now being planned have a construction as shown in FIG. 38.
This image coding apparatus 201c performs coding of quantized coefficients using the run value and the level value, like the image coding apparatus 201b shown in FIG. 34, while this image coding apparatus 201c does not perform a variable length coding process for the run value and the level value separately like the image coding apparatus 201b, but performs a variable length coding process for a pair of the run value and the level value (run-level pair).
To be more specific, the image coding apparatus 201c has, like the image coding apparatus 201b, a blocking unit Blk to which an image signal Vin is inputted, a frequency transformation unit Trans for subjecting an output BlkS from the blocking unit to frequency transformation, and a quantization unit Q for quantizing outputs (frequency components) TransS from the transformation unit. The image coding apparatus 201c further includes a run-length encoding unit RLE0c for subjecting outputs (quantized components) QS from the quantization unit to a run-length encoding process for transforming a run-level pair comprising a run value and a level value into a variable length code.
Next, its operation will be described.
The blocking unit Blk divides the image signal Vin into image signals corresponding to block units to generate pixel value components (blocked image signals) BlkS. The frequency transformation unit Trans transforms the pixel value components BlkS into frequency components TransS according to DCT (Discrete Cosine Transformation) or Wavelet transformation. The quantization unit Q quantizes the frequency components TransS on the basis of a quantization parameter QP to output quantized components QS, as well as outputs the quantization parameter Q. The run-length encoding unit RLE0c subjects the quantized components QS to run-length encoding, and outputs a coded stream Str0c. 
Here, the block is an area of a predetermined size in the picture (image space), which is a unit in a coding process for an image signal, and composed of a predetermined number of pixels. The run-length encoding is a process for transforming a pair comprising a run value that indicates the number of successive quantized components whose values are zero (zero coefficients) and a level value that indicates a value of a quantized component whose value is not zero (non-zero coefficient), following the zero coefficients, into a variable length code, in other words, a process for assigning one variable length code (code word) to a pair of a run value and a level value (run-level pair).
Next, the run-length encoding unit RLE0c will be specifically described.
FIG. 39 is a block diagram illustrating a conventional run-length encoding unit RLE0c. 
This run-length encoding unit RLE0c has, like the run-length encoding unit RLE0b as shown in FIG. 35, a zigzag scanner Scan for transforming the outputs (quantized components) QS in a two-dimensional array from the quantization unit Q, into quantized components Coef in a one-dimensional array (i.e., a predetermined order); a run calculator RunCal for calculating the number of successive quantized components whose values are zero (zero coefficients) Coef and outputting a run value Run; and a level calculator LevCal for calculating a value of a quantized component whose value is not zero (non-zero coefficient) Coef, following the zero coefficients, and outputting a level value Lev.
The run-length encoding unit RLE0c further includes a run-level encoder RunLevEnc for obtaining a code number Code corresponding to a pair of the level value Lev and the run value Run according to a code table or arithmetic operation on the basis of the outputs from the run calculator RunCal and the level calculator LevCal; and a variable length coder VLC for assigning a code word to the code number Code to generate a coded stream Str0c corresponding to the image signal Vin.
Next, its operation will be described.
In the run-length encoding unit RLE0c, like in the run-length encoding unit RLE0b, the zigzag scanner Scan transforms quantized components QS in a two-dimensional array, which are outputted from the quantization unit Q, into quantized components Coef in a one-dimensional array (predetermined order), and outputs the obtained quantized components.
FIG. 43 is a diagram for specifically explaining a process for transforming the quantized components QS by the zigzag scanner Scan.
The quantized components QS outputted from the quantization unit Q have a two-dimensional array as shown in FIG. 43, i.e., an array in which the quantized components QS arranged in the form of matrix on a two-dimensional frequency region Fr according to the size of the horizontal frequency component and the size of the vertical frequency component.
The zigzag scanner Scan carries out the process for scanning the quantized components QS in the two-dimensional array in a zigzag manner, as shown by arrows Y1 to Y7, to transform the quantized components QS into quantized components Coef in a one-dimensional array. That is, this scanning process sets a predetermined order along the scanning course, with respect to the plural quantized components QS in the two-dimensional array.
The run calculator RunCal calculates the number of successive zero coefficients on the basis of the quantized components Coef outputted from the zigzag scanner Scan, and outputs a run value Run indicating the calculated number. The level calculator LevCal calculates a value of a non-zero coefficient following the successive zero coefficients, on the basis of the quantized components Coef outputted from the zigzag scanner Scan, and outputs a level value indicating the calculated value. Here, the run calculator RunCal outputs a specific value EOB (End of Block) when detecting the highest frequency component (the last non-zero coefficient) in a target block to be processed, to inform that subsequent higher frequency components have all zero value.
Further, the run-level encoder RunLevEnc obtains a code number Code corresponding to a pair of the level value Lev and the run value Run on the basis of the outputs from the run calculator RunCal and the level calculator LevCal, according to a code table or arithmetic operation. The variable length coder VLC encodes the code number Code that is obtained by the converter RunLevEnc, i.e., assigns a code word (bit string) to the code number to generate a coded stream Str0.
FIG. 42 shows an example of a code table that is employed by the run-length encoding unit RLE0c. The code table (first coding table) T1 shown in FIG. 42 shows a code table corresponding to DC components of a color-difference signal that is compliant with a draft H.26L standard (TML8) that is now being planned.
This code table T is composed of a regularly generable part including code numbers corresponding to pairs of level values and run values which can be calculated according to an arithmetic operation using level values and run values (regularly build VLC), and an irregular part including code numbers corresponding to pairs of level values and run values which cannot be calculated by the arithmetic operation (table look up VLC). Further, a bit string (not shown) is assigned to each code number Code as a code word in a one-to-one relationship. A shorter code word is assigned to a code number Code having a smaller value.
Next, a conventional decoding apparatus corresponding to the image coding apparatus 201c will be described.
FIG. 40 is a block diagram illustrating an image decoding apparatus 202c that employs a conventional run-length decoding unit RLD0.
This image decoding apparatus 202c decodes the coded stream Str0c that is outputted from the conventional image coding apparatus 201c shown in FIG. 39.
The image decoding apparatus 202c decodes quantized Coefficients using the run value and the level value, as the image decoding apparatus 202b in FIG. 36, while this image decoding apparatus 202c does not carry out variable length decoding of the run value and the level value separately like the image decoding apparatus 202b, but carries out variable length decoding of a pair comprising the run value and the level value (run-level pair).
To be more specific, the image decoding apparatus 202c has a run-length decoding unit RLD0c that subjects the coded stream Str0c outputted from the image coding apparatus 201c to a run-length decoding process using a run-level pair comprising a run value and a level value. The image decoding apparatus 202c further has, as the image decoding apparatus 202b, an inverse quantization unit IQ for subjecting outputs (decoded quantized components) DQS from the run-length decoding unit RLDc to an inverse quantization process; a inverse frequency transformation unit ITrans for subjecting outputs (decoded frequency components) ITransS from the inverse quantization unit IQ to an inverse frequency transformation process; and a deblocking unit DeBlk for generating a decoded image signal Vout corresponding to each picture on the basis of outputs (decoded pixel value components) DBlkS from the inverse frequency transformation unit ITrans.
Next, its operation will be described.
In the image decoding apparatus 202c, the run length decoding unit RLD0c carries out the inverse of the operation of the run-length encoding unit RLE0c. To be more specific, the run-length decoding unit RLD0c subjects the coded stream Str0c to a run-length decoding process to output decoded quantized components DQS. The inverse quantization unit IQ carries out the inverse operation to the quantization unit Q, i.e., an operation of inversely quantizing the decoded quantized components DQS with referring to a quantization parameter QP to output decoded frequency components ITransS. The inverse frequency transformation unit ITrans carries out the inverse operation to the frequency transformation unit Trans, i.e., an operation of subjecting the decoded frequency components ITransS to inverse DCT or inverse Wavelet transformation, to reconstitute a decoded pixel value signal (decoded blocked image signal) DBlkS corresponding to each block. The deblocking unit DeBlk integrates the image pixel value components for the respective blocks, and outputs a decoded image signal Vout corresponding to each picture (frame).
Next, the run-length decoding unit RLD0c will be specifically described.
FIG. 41 is a block diagram for explaining a specific construction of the run-length decoding unit RLD0c. 
This run-length decoding unit RLD0c has a variable length decoder VLD for subjecting the coded stream Str0c to a variable length decoding process to obtain a code number Code corresponding to each code (code word) included in the coded stream Str0c; a run-level detector RunLevDec for detecting a pair of a level value Lev and a run value Run, corresponding to the code number Code; and an inverse zigzag scanner IScan for reconstituting decoded quantized components DQS in a two-dimensional array from decoded quantized components in a one-dimensional array, which are represented by the level values Lev and the run values Run, on the basis of the pairs of the level values Lev and the run values Run.
Next, its operation will be described.
In this run-length decoding unit RLD0c, the variable length decoder VLD decodes the coded stream Str0c, and outputs a code number Code corresponding to a code word (bit string) according to the inverse operation to the variable length coder VLC. The run-level detector RunLevDec refers to a code table or performs an arithmetic operation to output a pair of a level value Lev and a run value Run, corresponding to the code number Code, according to the inverse operation to the run-level encoder RunLevEnc. The inverse zigzag scanner IScan reconstitutes decoded quantized components DQS in a two-dimensional array from quantized components in a one-dimensional array which are represented by the pairs of the level values Lev and the run values Run according to the inverse operation to the zigzag scanner Scan, and outputs the decoded quantized components DQS to the inverse quantization unit IQ.
Japanese Published Patent Application No. Hei. 6-237184 discloses a run-length encoding method in which plural coefficients in a predetermined order are coded using a run value Run that indicates the number of quantized components whose values are zero (zero coefficients) Coef, and a level value Lev that indicates a value of a quantized component whose value is not zero (non-zero coefficient) Coef, following the zero coefficients.
Japanese Patent No. 3144456 (corresponding to Japanese Published Patent Application No. Hei. 8-79088) discloses a method by which a variable length coding table (VLC table) is changed according to the value of a differential motion vector value when the differential motion vector value is coded using a variable length coding table in a method for predictively coding digital video data.
Further, an arithmetical coding is known as another method by which the pixel values are variable-length coded, in which variable length coding is performed according to an arithmetic operation by using probability in which the pixel value may take a predetermined value. According to the arithmetical coding, a code is derived from the probability, so that a probability table in which probabilities corresponding to individual situations are described corresponds to the VLC table. Here, “All about MPEG-4” (first edition, first print, published Sep. 30, 1998, written and edited by Miki Sukeichi, pp. 69–73, Kogyo Chosakai Publishing Co., Ltd.) describes a method by which pixel values of pixels corresponding to a coding target are subjected to arithmetic coding by changing a probability table on the basis of a prediction method (context) for a coding target pixel which are predicted from pixel values of the surrounding pixels.
The above-mentioned coding unit RLE0a of the conventional image coding apparatus 201a performs variable length coding for plural quantized coefficients which are obtained by quantizing frequency components of image data, for each predetermined processing unit (block). This coding unit employs a predetermined code table that indicates correspondences between numerical value information showing the size of each quantized coefficient and a code (code word). In the variable length coding process by the coding unit, redundant information included in the quantized coefficient (data to be processed) cannot be removed sufficiently and, thus, the compression rate may be further improved.
Also in the run-length encoding unit that carries out variable length coding of plural quantized coefficients using a run value that indicates the number of quantized components whose values are zero (zero coefficients) Coef, and a level value that indicates a value of a quantized component whose value is not zero (non-zero coefficient) Coef, following the zero coefficients, like the coding units RLE0b or RLE0c in the conventional image coding apparatus 201b or 201c, redundant information included in the quantized coefficients in the variable length coding process is not sufficiently removed.
Further, the decoding unit RLD0a of the conventional image decoding apparatus 202a or the run-length decoding unit RLD0b or RLD0c of the conventional image decoding apparatus 202b or 202c corresponds to a coding unit which cannot sufficiently remove redundant information included in the quantized coefficients in the variable length coding process for the quantized coefficients.
Further, as for the method by which a variable length coding table (VLC table) is changed according to the value of a differential motion vector value when the differential motion vector value is coded using a variable length coding table in a method for predictively coding digital video data, an effective change of the coding table in a variable length coding process for data having such characteristics that plural zero coefficients successively follow, like the quantized coefficients which are obtained by quantizing frequency components of an image signal has not been known.
The present invention is made to solve the above-mentioned problems, and this invention has for its object to provide a variable length coding method and a variable length decoding method, which can remove redundant information included in target data (quantized coefficients) for a variable length coding process, more effectively according to characteristics of the quantized coefficients and states of a coding process for the quantized components, thereby further increasing a compression rate of an image signal or the like.